package com.qf.utils;

import cn.hutool.core.io.file.FileReader;

import java.util.List;

/**
 * 文件操作工具类
 */
public class FileUtils {

    public static List<String> loadDataFromFile(String filepath){

        FileReader fileReader = new FileReader(filepath);
        return fileReader.readLines();

    }

    public static void main(String[] args) {
        List<String> data = FileUtils.loadDataFromFile("D:\\00qd2306\\name2306.txt");
        for (int i = 0; i < data.size(); i++) {
            System.out.println(data.get(i));
        }
    }

}
